package com.myth.process;

public class TestThread3 implements Runnable {

    private int a = 10;

    public void run() {
        while (a > 0) {
            /*if(a<=0){
                break;
            }*/
            System.out.println(Thread.currentThread().getName() + "-->拿到第" + a-- + "票");
        }
    }

    public static void main(String[] args){

        TestThread3 t = new TestThread3();

        new Thread(t,"小明").start();
        new Thread(t,"小花").start();
        new Thread(t,"黄牛").start();

    }





}
